package com.iwhalecloud.citybrain.flow.platform.manager.application.service;

import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.JavaDelegate;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class MyJavaDelegate implements JavaDelegate {
    @Override
    public void execute(DelegateExecution execution) {
        Object myVar = execution.getVariable("myVar");
        Object myVar1 = execution.getVariable("myVar1");
        Object MyJavaDelegateResult = execution.getVariable("MyJavaDelegateResult");
        log.info("===========MyJavaDelegate==========================");
        log.info("===========myVar=========================="+myVar);
        log.info("===========myVar1=========================="+myVar1);
        log.info("===========MyJavaDelegateResult=========================="+MyJavaDelegateResult);

    }

    private String ready;

    public String getReady() {
        log.info("============ready===================");
        return "ready";
    }

    public void printMessage(){
        log.info("=============MyJavaDelegate===printMessage=======");
    }

}
